#!/usr/bin/env python
"""Django 的命令行工具，用于管理任务。"""
import os
import sys


def main():
    """运行管理任务。"""
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ll_project.settings")
    try:
        from django.core.management import execute_from_command_line
    except ImportError as exc:
        raise ImportError(
            "无法导入 Django。请确认它已安装并且 "
            "可用于您的 PYTHONPATH 环境变量中。您是否 "
            "忘记激活虚拟环境了？"
        ) from exc
    execute_from_command_line(sys.argv)


if __name__ == "__main__":
    main()
